<gui:menubar id='myInnerMenubar'>
  <sec:ifLoggedIn>
  %{--<gui:menuitem url='http://example.com'>Example</gui:menuitem>--}%
    <sec:ifAnyGranted roles="ROLE_SA_USER, ROLE_ADMIN_USER, ROLE_SUPER_USER">

    <gui:submenu label='Project'>
      <gui:menuitem url='${createLink (action:"list", controller:"project")}'>List</gui:menuitem>
      <gui:menuitem url='${createLink (action:"create", controller:"project")}'>Add</gui:menuitem>
    </gui:submenu>
    <gui:submenu label='Dashboard'>
      <gui:menuitem url='${createLink (action:"list", controller:"projectDashboard")}'>List</gui:menuitem>
      <gui:menuitem url='${createLink (action:"create", controller:"project")}'>Add</gui:menuitem>
    </gui:submenu>

    </sec:ifAnyGranted>
    
    <sec:ifAnyGranted roles="ROLE_SUPER_USER, ROLE_ADMIN_USER">
      
      <gui:submenu label='Employee Roster'>
        <gui:menuitem url='${createLink (action:"list", controller:"person")}'>List</gui:menuitem>
        <gui:menuitem url='${createLink (action:"create", controller:"person")}'>Add</gui:menuitem>
      </gui:submenu>

      <gui:submenu id="outerSubmenu2" label="Admin">
        <gui:menuitem url='${createLink (action:"list", controller:"requestMap")}'>ACL</gui:menuitem>
        <gui:submenu id="innerSubmenu2" label='Security'>
          <gui:menuitem url='${createLink (action:"list", controller:"user")}'>Users</gui:menuitem>
          <gui:menuitem url='${createLink (action:"list", controller:"authority")}'>Roles</gui:menuitem>
          <gui:menuitem url='${createLink (action:"create", controller:"userAuthority")}'>User Roles</gui:menuitem>
        </gui:submenu>
      </gui:submenu>
    </sec:ifAnyGranted>
    <gui:menuitem url='${createLink (controller:"logout")}'>Logout</gui:menuitem>
  </sec:ifLoggedIn>
  <sec:ifNotLoggedIn>
    <gui:menuitem url='${createLink (action:"auth", controller:"login")}'>Login</gui:menuitem>
  </sec:ifNotLoggedIn>
  <sec:ifNotLoggedIn>
    <gui:menuitem url='${createLink (action:"resetPassword", controller:"user")}'>Reset Password</gui:menuitem>
  </sec:ifNotLoggedIn>

</gui:menubar>


<div id='innerDiv' style="width: 100%; margin:20px, 200px; border: 5px solid white">
  <div id='innerMenu'></div>
</div>

%{--<gui:dialog title="Add Project Status" dataURL="<g:createLink controller='productStatus' action='create'/>"  modal="true">--}%
%{--</gui:dialog>--}%

%{--triggers="[show:[type:'link', text:'Add Status', on:'click']]"--}%

